package com.msb.order.controller;

import com.msb.order.service.UserFeignService;
import com.msb.order.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignOrderController {

    @Autowired
    private UserFeignService userFeignService;

    @RequestMapping("/getOrders/{userId}")
    public Result getOrders(@PathVariable("userId") Integer userId){
        Result resultUserInfo = userFeignService.getUserName(userId);
        /**
         * 处理其它业务
         */
        return resultUserInfo;
    }
}